package com.city.domain.party;

import javax.persistence.*;
import java.util.Objects;

/**
 * @deprecation: 流出申请
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Entity
@Table(name = "party_flowout", schema = "city", catalog = "")
public class PartyFlowout {
    private int id;//主键
    private String name;//姓名
    private int userId;//用户id
    private String sourceBranch;//原党组织
    private String flowoutBranch;//流出党组织
    private String flowoutTell;//流出党组织电话
    private String flowoutPerson;//流出党组织联系人
    private String reason;//流动原因
    private String type;//流动类型
    private String sourceOccupation;//原职业
    private String pExplain;//申请说明
    private String time;//申请时间
    private String updateTime;

    public String getpExplain() {
        return pExplain;
    }

    public void setpExplain(String pExplain) {
        this.pExplain = pExplain;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "user_id")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "source_branch")
    public String getSourceBranch() {
        return sourceBranch;
    }

    public void setSourceBranch(String sourceBranch) {
        this.sourceBranch = sourceBranch;
    }

    @Basic
    @Column(name = "flowout_branch")
    public String getFlowoutBranch() {
        return flowoutBranch;
    }

    public void setFlowoutBranch(String flowoutBranch) {
        this.flowoutBranch = flowoutBranch;
    }

    @Basic
    @Column(name = "flowout_tell")
    public String getFlowoutTell() {
        return flowoutTell;
    }

    public void setFlowoutTell(String flowoutTell) {
        this.flowoutTell = flowoutTell;
    }

    @Basic
    @Column(name = "flowout_person")
    public String getFlowoutPerson() {
        return flowoutPerson;
    }

    public void setFlowoutPerson(String flowoutPerson) {
        this.flowoutPerson = flowoutPerson;
    }

    @Basic
    @Column(name = "reason")
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "source_occupation")
    public String getSourceOccupation() {
        return sourceOccupation;
    }

    public void setSourceOccupation(String sourceOccupation) {
        this.sourceOccupation = sourceOccupation;
    }


    @Basic
    @Column(name = "time")
    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Basic
    @Column(name = "update_time")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PartyFlowout that = (PartyFlowout) o;
        return id == that.id &&
                userId == that.userId &&
                Objects.equals(name, that.name) &&
                Objects.equals(sourceBranch, that.sourceBranch) &&
                Objects.equals(flowoutBranch, that.flowoutBranch) &&
                Objects.equals(flowoutTell, that.flowoutTell) &&
                Objects.equals(flowoutPerson, that.flowoutPerson) &&
                Objects.equals(reason, that.reason) &&
                Objects.equals(type, that.type) &&
                Objects.equals(sourceOccupation, that.sourceOccupation) &&
                Objects.equals(pExplain, that.pExplain) &&
                Objects.equals(time, that.time) &&
                Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, name, userId, sourceBranch, flowoutBranch, flowoutTell, flowoutPerson, reason, type, sourceOccupation, pExplain, time, updateTime);
    }
}
